﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using Playerstats;

namespace parserWebService
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://jur1.no-ip.org/webservices/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {
        
        Stats db = new Stats();
        [WebMethod]
        public Village getVillage(int x, int y)
        {
            var q = (from v in db.Villages
                     where v.X == x && v.Y == y
                     select v).SingleOrDefault();
       // Stats db = new Stats();
            return q;
        }
    }
}